package cn.lastjune.pojo;

// Generated 2011-3-27 20:32:23 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Mission generated by hbm2java
 */
@Entity
@Table(name = "MISSION", schema = "CGB2")
public class Mission implements java.io.Serializable
{

    private String tasknum;
    private Accpetregion accpetregion;
    private Processregion processregion;
    private String recdispnum;
    private Date firstdispatchtime;
    private Date lastdispatchtime;
    private Date disposestarttime;
    private Date disposeendtime;
    private Set<Processregion> processregions = new HashSet<Processregion>(0);
    private Set<Accpetregion> accpetregions = new HashSet<Accpetregion>(0);

    public Mission()
    {
    }

    public Mission(String tasknum)
    {
        this.tasknum = tasknum;
    }

    public Mission(String tasknum, Accpetregion accpetregion, Processregion processregion, String recdispnum,
            Date firstdispatchtime, Date lastdispatchtime, Date disposestarttime, Date disposeendtime,
            Set<Processregion> processregions, Set<Accpetregion> accpetregions)
    {
        this.tasknum = tasknum;
        this.accpetregion = accpetregion;
        this.processregion = processregion;
        this.recdispnum = recdispnum;
        this.firstdispatchtime = firstdispatchtime;
        this.lastdispatchtime = lastdispatchtime;
        this.disposestarttime = disposestarttime;
        this.disposeendtime = disposeendtime;
        this.processregions = processregions;
        this.accpetregions = accpetregions;
    }

    @Id
    @Column(name = "TASKNUM", unique = true, nullable = false, length = 40)
    public String getTasknum()
    {
        return tasknum;
    }

    public void setTasknum(String tasknum)
    {
        this.tasknum = tasknum;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "ACCEPTDISTRICTID")
    public Accpetregion getAccpetregion()
    {
        return accpetregion;
    }

    public void setAccpetregion(Accpetregion accpetregion)
    {
        this.accpetregion = accpetregion;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PROCESSDISTRICTID")
    public Processregion getProcessregion()
    {
        return processregion;
    }

    public void setProcessregion(Processregion processregion)
    {
        this.processregion = processregion;
    }

    @Column(name = "RECDISPNUM", length = 40)
    public String getRecdispnum()
    {
        return recdispnum;
    }

    public void setRecdispnum(String recdispnum)
    {
        this.recdispnum = recdispnum;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "FIRSTDISPATCHTIME", length = 7)
    public Date getFirstdispatchtime()
    {
        return firstdispatchtime;
    }

    public void setFirstdispatchtime(Date firstdispatchtime)
    {
        this.firstdispatchtime = firstdispatchtime;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "LASTDISPATCHTIME", length = 7)
    public Date getLastdispatchtime()
    {
        return lastdispatchtime;
    }

    public void setLastdispatchtime(Date lastdispatchtime)
    {
        this.lastdispatchtime = lastdispatchtime;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "DISPOSESTARTTIME", length = 7)
    public Date getDisposestarttime()
    {
        return disposestarttime;
    }

    public void setDisposestarttime(Date disposestarttime)
    {
        this.disposestarttime = disposestarttime;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "DISPOSEENDTIME", length = 7)
    public Date getDisposeendtime()
    {
        return disposeendtime;
    }

    public void setDisposeendtime(Date disposeendtime)
    {
        this.disposeendtime = disposeendtime;
    }

    @OneToMany(fetch = FetchType.LAZY, mappedBy = "mission")
    public Set<Processregion> getProcessregions()
    {
        return processregions;
    }

    public void setProcessregions(Set<Processregion> processregions)
    {
        this.processregions = processregions;
    }

    @OneToMany(fetch = FetchType.LAZY, mappedBy = "mission")
    public Set<Accpetregion> getAccpetregions()
    {
        return accpetregions;
    }

    public void setAccpetregions(Set<Accpetregion> accpetregions)
    {
        this.accpetregions = accpetregions;
    }

}
